class IrrPhysBase
{
public:
	// containter for bullet physics
	//=== vars ===//
	VxIrrBase *								m_poIrrBase;	// base graphics engine
	//=== bullet physics vars ===//
	// create world
	btDefaultCollisionConfiguration*		m_poPhysCollisionConfiguration;
	btDispatcher*							m_poPhysDispatcher;
	btBroadphaseInterface*					m_poPhysPairCache;
	btConstraintSolver*						m_poPhysConstraintSolver;
	btDiscreteDynamicsWorld*				m_poPhysDynamicsWorld;

	// params
	float									m_f32PhysContactBreakingThreshold;
	float									m_f32PhysWorldScaling;
	float									m_f32PhysPlayerForwardBackward;
	float									m_f32PhyPlayerSideways;

	int										m_iPhysCreatedObjectsCnt;
	int										m_iPhysUpdatedBodiesCnt;

	// events and objects
	btAlignedObjectArray<btCollisionShape*> m_aoPhysCollisionShapes;

	// 

	//=== constructor ===//
	IrrPhysBase();
	//=== destructor ===//
	virtual ~IrrPhysBase();

	//! initialize physics
	void PhysStartup( VxIrrBase * poIrrBase );
	//! shutdown physics
	void PhysShutdown( void );

	//=== properties ===//
	btDiscreteDynamicsWorld* GetPhysWorld( void )	{ return m_poPhysDynamicsWorld; }

	//=== methods ===//

	//! run physics
	void PhysStep( U32 u32MilliSec );


	//! Create a box rigid body and attach scene node
	void PhysCreateBox(	irr::scene::ISceneNode *	poSceneNode,			// irrlicht scene node to attach box physics to
						const btVector3&			btVec3Position,			// position in world to place node at
						const btVector3&			btVec3InitialVelocity,	// initial velocity of object
						const irr::core::vector3df& v3fScale,				// scale of object 
						btScalar					f32Mass );				// mass of object

	//! raycast into world.. return true if collision occured
	BOOL RaycastWorld(	const btVector3&	vec3Start,			// starting point of ray
						btVector3&			vec3RetEnd,			// ending point of ray  ( also return collision point if collision point occures )
						btVector3&			vec3RetNormal,		// normal of collision point
						EPhysFilterTypes	eCollideMask = ePhysFilterCamera ); // mask of collision groups to check for collision

};

